package com.imooc.rabbit.common.serializer.impl;

import com.imooc.rabbit.api.Message;
import com.imooc.rabbit.common.serializer.Serializer;
import com.imooc.rabbit.common.serializer.SerializerFactory;

/**
 * @description: 序列化工厂实现类
 * @author: Yz
 * @create: 2020-10-10 14:50
 **/
public class JacksonSerializerFactory implements SerializerFactory {

    public static final SerializerFactory INSTANCE = new JacksonSerializerFactory();

    @Override
    public Serializer create() {
        return JacksonSerializer.createParametricType(Message.class);
    }
}
